package cn.melonlib.cores.jpa.model.bean.adapter;

import cn.melonlib.cores.jpa.model.bean.Searcher;

import javax.persistence.EntityManager;
import java.util.List;

public class SimpleSearcher<DATA> implements Searcher<List<DATA>,String> {

    public List<DATA> search(String s, EntityManager entityManager) {
        return entityManager.createQuery(s).getResultList();
    }

    public Class<String> registerType() {
        return null;
    }
}
